package com.rfid.acs;


import com.rfid.acs.net.tcp.FiledId;

class BorrowBookRequestBean extends AcsRequestBean {

    /**
     * 用于判断是否是续借的标记
     */
    private boolean renewal;

    @Override
    public String requestCommand() {
        return renewal ? "29YN" : "11YN";
    }

    @FiledId(name = "AO")
    private String devicesName;

    @FiledId(name = "AA")
    private String readerNo;

    @FiledId(name = "AB")
    private String bookNo;

    @FiledId(name = "UI")
    private String uid;

    @FiledId(name = "CI")
    private String devicesNo;

    @FiledId(name = "MC")
    private String macAddress;

    @FiledId(name = "AC")
    private String extend;

    @FiledId(name = "AD")
    private String password;

    @Override
    public String dateAfter() {
        return date;
    }

    public boolean isRenewal() {
        return renewal;
    }

    public void setRenewal(boolean renewal) {
        this.renewal = renewal;
        command = requestCommand();
    }

    public String getDevicesName() {
        return devicesName;
    }

    public void setDevicesName(String devicesName) {
        this.devicesName = devicesName;
    }

    public String getReaderNo() {
        return readerNo;
    }

    public void setReaderNo(String readerNo) {
        this.readerNo = readerNo;
    }

    public String getBookNo() {
        return bookNo;
    }

    public void setBookNo(String bookNo) {
        this.bookNo = bookNo;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getDevicesNo() {
        return devicesNo;
    }

    public void setDevicesNo(String devicesNo) {
        this.devicesNo = devicesNo;
    }

    public String getMacAddress() {
        return macAddress;
    }

    public void setMacAddress(String macAddress) {
        this.macAddress = macAddress;
    }

    public String getExtend() {
        return extend;
    }

    public void setExtend(String extend) {
        this.extend = extend;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
